//package com.baibei.module.stock.theme;
//
//import android.graphics.Color;
//
//import com.baibei.widget.stock.theme.def.DefaultMinuteTheme;
//import com.github.mikephil.charting.charts.Chart;
//import com.github.mikephil.charting.components.YAxis;
//import com.github.mikephil.charting.data.DataSet;
//import com.github.mikephil.charting.data.LineDataSet;
//
///**
// * 分时图主题
// * Created by ChenRui on 2017/8/16 0016 10:35.
// */
//public class MinuteChartTheme extends DefaultMinuteTheme {
//
////    private final int fillColor = Color.parseColor("#EBF6F8");
//    private final int fillColor = Color.parseColor("#B3303030");
////    private final int lineColor = Color.parseColor("#96DBF9");
//    private final int lineColor = Color.parseColor("#000000");
//    protected final int gridColor = Color.parseColor("#0D303030");
//    protected final int textColor = Color.parseColor("#B3303030");
//
//    @Override
//    public void loadTheme(Chart chart) {
//        super.loadTheme(chart);
//        this.mChart.getAxisLeft().setPosition(YAxis.YAxisLabelPosition.INSIDE_CHART);
//        this.mChart.getAxisRight().setPosition(YAxis.YAxisLabelPosition.INSIDE_CHART);
//        this.mChart.getAxisLeft().setDrawAxisLine(true);
//        this.mChart.getAxisLeft().setDrawGridLines(true);
//        this.mChart.getAxisLeft().setGridColor(gridColor);
//        this.mChart.getAxisLeft().setAxisLineColor(gridColor);
//        this.mChart.getXAxis().setDrawLabels(true);
//        this.mChart.getXAxis().setTextColor(textColor);
////        this.mChart.getXAxis().setLabelCount(3);
//        this.mChart.getAxisRight().setEnabled(false);
//        this.mChart.getAxisLeft().setLabelCount(3,true);
//        this.mChart.getAxisLeft().setSpaceTop(28);
//        this.mChart.getXAxis().setAxisMaximum(960);
//    }
//
//    @Override
//    public void loadDataSetTheme(DataSet... dataSet) {
//        super.loadDataSetTheme(dataSet);
//        LineDataSet set = (LineDataSet) dataSet[0];
//        set.setFillColor(fillColor);
//        set.setColor(lineColor);
//    }
//
//    @Override
//    protected void onSetViewPortOffset() {
//
//    }
//}

package com.baibei.module.stock.theme;

import android.graphics.Color;

import com.baibei.widget.stock.theme.def.DefaultMinuteTheme;
import com.github.mikephil.charting.charts.Chart;
import com.github.mikephil.charting.components.YAxis;
import com.github.mikephil.charting.data.DataSet;
import com.github.mikephil.charting.data.LineDataSet;

/**
 * 分时图主题
 * Created by ChenRui on 2017/8/16 0016 10:35.
 */
public class MinuteChartTheme extends DefaultMinuteTheme {

    private final int fillColor = Color.parseColor("#0D303030");
    private final int lineColor = Color.parseColor("#303030");
    protected final int gridColor = Color.parseColor("#0D303030");
    protected final int textColor = Color.parseColor("#B3303030");

    @Override
    public void loadTheme(Chart chart) {
        super.loadTheme(chart);
        this.mChart.getAxisLeft().setPosition(YAxis.YAxisLabelPosition.OUTSIDE_CHART);
        this.mChart.getAxisRight().setPosition(YAxis.YAxisLabelPosition.OUTSIDE_CHART);
        this.mChart.getAxisLeft().setDrawAxisLine(true);
        this.mChart.getAxisLeft().setDrawGridLines(true);
        this.mChart.getAxisLeft().setGridColor(gridColor);
        this.mChart.getAxisLeft().setAxisLineColor(gridColor);
        this.mChart.getXAxis().setDrawLabels(true);
        this.mChart.getXAxis().setTextColor(textColor);
        this.mChart.getXAxis().setLabelCount(3);
        this.mChart.getAxisRight().setEnabled(false);
    }

    @Override
    public void loadDataSetTheme(DataSet... dataSet) {
        super.loadDataSetTheme(dataSet);
        LineDataSet set = (LineDataSet) dataSet[0];
        set.setFillColor(fillColor);
        set.setColor(lineColor);
    }

    @Override
    protected void onSetViewPortOffset() {

    }
}
